package com.web.userservice.controller;

import com.web.userservice.entity.UserVO;
import com.web.userservice.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Resource
    private UserService userService;

    @PostMapping("/login")
    public ResponseEntity<UserVO> login(String username,String password){
        UserVO userVO = userService.login(username, password);
        return ResponseEntity.ok(userVO);
    }
}
